<template>
  <div>
    <div v-if="user">
      <Release></Release>
    <Released></Released>
    </div>
    <div v-else>
      <h1>登录后才可查看此页面</h1>
      <el-button type="primary" @click="goLogin">马上登录</el-button>
    </div>
  </div>
</template>

<script>
import Release from '@/components/release/Release.vue'
import Released from '@/components/release/Released.vue'
export default {
  components: {Release,Released},
  data() {
    return {
      user: localStorage.getItem('user')
    }
  },
  methods:{
    goLogin() {
      this.$router.push('/login')
    }
  }
}
</script>

<style scoped>

</style>